package com.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.welica.wat.stragety.annotation.DistributeLock;

/**
* @ClassName: DemoController
* @Description: 测试样例
* @author weiyongpeng
* @date 2024年11月1日 下午10:33:56
 */
@RestController
@RequestMapping("/test")
public class DemoController {

	@GetMapping("/testAnno")
	@DistributeLock(lockName = "testAnno")
	public String testLock(String name) throws InterruptedException {
		// 3min
		System.out.println(name);
		// 业务逻辑
		return name;
	}
	
}
